package com.ithe.system.pojo.dto;

public class PageInfo {
    //当前页数
    private Integer page=1;

    //分页大小
    private Integer limit=5;

    //开始序号
    private Integer startIndex;

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    /**
     * 计算开始序号
     * @return
     */
    public Integer getStartIndex() {
        return (this.page-1)*this.limit;
    }

    public PageInfo() {
    }

    public PageInfo(Integer page, Integer limit, Integer startIndex) {
        this.page = page;
        this.limit = limit;
        this.startIndex = startIndex;
    }
}
